﻿using DIS.DataBus.RabbitMQ;
using EasyNetQ;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace RabbitMQ示例
{
    /// <summary>
    /// 使用彭轶提供组件的页面.xaml 的交互逻辑
    /// </summary>
    public partial class 使用彭轶提供组件的页面 : UserControl
    {
        public 使用彭轶提供组件的页面()
        {
            InitializeComponent();
        }

        /// <summary>
        /// 联接到MQ
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button_Click(object sender, RoutedEventArgs e)
        {
            //RabbitMqClient client0 = new RabbitMqClient("host=192.168.2.110;username=rabbitmq;password=rabbitmq", );
          
            //RabbitMqClient client1 = new RabbitMqClient(new ConnectionConfiguration()
            //{
            //    Hosts = new List<HostConfiguration>() { new HostConfiguration() { Host = "192.168.2.110" } },
            //    UserName = "rabbitmq",
            //    Password = "rabbitmq",
            // });
        }
        /// <summary>
        /// 发送数据到MQ
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnSend_Click(object sender, RoutedEventArgs e)
        {

        }
        /// <summary>
        /// 创建channel
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btcahannel_Click(object sender, RoutedEventArgs e)
        {

        }
        /// <summary>
        /// 创建exchange
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnExcange_Click(object sender, RoutedEventArgs e)
        {

        }
    }
}
